export const dicts = {
  maintenanceState: [
    { label: "正常", value: 0, type: "success" },
    { label: "待维护", value: 1, type: "warning" }
  ],
  inspectState: [{ label: "待检查", value: 1, type: "primary" }]
};
export const getCode = (code, val) => {
  const temp = dicts[code];
  const initData = { label: "", type: "default" };
  if (temp) {
    return dicts[code].find(ele => `${ele.value}` === `${val}`) || initData;
  }
  return initData;
};
